<!--
 * @FileDescription: 左侧导航栏子模块
 * @Author: 汤子豪
 * @Date: 2021.6.24
 * @LastEditors: 汤子豪
 * @LastEditTime: 2021.6.25
 -->
<template>
    <el-menu-item   :index="item.navPath" v-if="item.children.length==0">
      <i class="el-icon-menu"></i>
      <span slot="title">{{item.navName}}</span>
    </el-menu-item>
   
    <el-submenu  v-else :index="item.navPath">
      <template slot="title">
        <i class="el-icon-location"></i>
        <span>{{item.navName}}</span>
      </template>
     <AsideItem
      v-for="sub in item.children"
      :key="sub.navPath"
      :item="sub"
      :basePath="sub.navUrl"
    ></AsideItem>
    </el-submenu>
</template>

<script>
export default {
  name: "AsideItem",
  data() {
    return {
    
    };
  },
  props:['item']
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>
